home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------
- //
- // Schedule.wfm -- Schedule data view and edit form
- //
- // This form displays data from the Schedule table and
- // allows for the editing of existing records.
- //
- // Dependencies: SCHEDULE.DMD
- // FLEET.CFM
- //
- // Visual dBASE Samples Group
- //
- // $Revision: 1.8 $
- //
- // Copyright (c) 1997, Borland International, Inc.
- // All rights reserved.
- //
- //---------------------------------------------------------------
- SET TALK OFF
- ** END HEADER -- do not remove this line
- //
- // Generated on 10/23/97
- //
- parameter bModal
- local f
- f = new scheduleForm()
- if (bModal)
- f.mdi = false // ensure not MDI
- f.readModal()
- else
- f.open()
- endif
-
- class scheduleForm of FLEETCFORM from "FLEET.CFM"
- with (this)
- open = class::FORM_OPEN
- readModal = class::FORM_READMODAL
- scaleFontSize = 8
- height = 17
- left = 10
- top = 1
- width = 65
- text = "Schedule"
- sizeable = false
- endwith
-
-
- this.MOD = new DATAMODREF()
- this.MOD.parent = this
- with (this.MOD)
- filename = "SCHEDULE.DMD"
- dataModClass = "ScheduleDataModule"
- share = 0
- active = true
- left = -0.1429
- top = -0.0455
- endwith
-
-
- this.TEXTBOXSCHEDULE = new TEXT(this)
- with (this.TEXTBOXSCHEDULE)
- height = 5
- left = 1
- top = 0.5
- width = 48
- metric = 0
- colorNormal = "BLUE/BLUE"
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontItalic = true
- text = "Schedule Information"
- borderStyle = 2
- endwith
-
-
- this.LABELFLIGHTDATE = new TEXT(this)
- with (this.LABELFLIGHTDATE)
- height = 1
- left = 2
- top = 2
- width = 8.5
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Date:"
- endwith
-
-
- this.SPINFLIGHTDATE = new SPINBOX(this)
- with (this.SPINFLIGHTDATE)
- onChange = class::SPINFLIGHTDATE_ONCHANGE
- height = 1
- left = 11
- top = 2
- width = 14
- metric = 0
- dataLink = form.MOD.ref.schedule1.rowset.fields["Flight Date"]
- colorHighLight = ""
- rangeMax = {05/05/98}
- rangeMin = {01/25/98}
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 7
- endwith
-
-
- this.LABELBOOKED = new TEXT(this)
- with (this.LABELBOOKED)
- height = 1
- left = 2
- top = 4
- width = 8.5
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Booked:"
- endwith
-
-
- this.ENTRYBOOKED = new ENTRYFIELD(this)
- with (this.ENTRYBOOKED)
- enabled = false
- height = 1
- left = 11
- top = 4
- width = 6
- metric = 0
- dataLink = form.MOD.ref.schedule1.rowset.fields["Booked"]
- picture = "99999"
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.LABELFLIGHTID = new TEXT(this)
- with (this.LABELFLIGHTID)
- height = 1
- left = 28
- top = 2.25
- width = 7
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Flight:"
- endwith
-
-
- this.ENTRYFLIGHTID = new ENTRYFIELD(this)
- with (this.ENTRYFLIGHTID)
- height = 1
- left = 36
- top = 2.25
- width = 9.5
- metric = 0
- dataLink = form.MOD.ref.schedule1.rowset.fields["Flight ID"]
- picture = "99999999"
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 7
- endwith
-
-
- this.LABELAIRCRAFTID = new TEXT(this)
- with (this.LABELAIRCRAFTID)
- height = 1
- left = 28
- top = 3.75
- width = 7
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Aircraft:"
- endwith
-
-
- this.ENTRYAIRCRAFTID = new ENTRYFIELD(this)
- with (this.ENTRYAIRCRAFTID)
- height = 1
- left = 36
- top = 3.75
- width = 9.5
- metric = 0
- dataLink = form.MOD.ref.schedule1.rowset.fields["Aircraft ID"]
- picture = "99999999"
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 7
- endwith
-
-
- this.TEXTBOXFLIGHT = new TEXT(this)
- with (this.TEXTBOXFLIGHT)
- height = 6
- left = 1
- top = 6.1579
- width = 48
- metric = 0
- colorNormal = "BLUE/BLUE"
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontItalic = true
- text = "Flight Information"
- borderStyle = 2
- endwith
-
-
- this.LABELFROM = new TEXT(this)
- with (this.LABELFROM)
- height = 1
- left = 2
- top = 7.5
- width = 8
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Departs:"
- endwith
-
-
- this.LABELTO = new TEXT(this)
- with (this.LABELTO)
- height = 1
- left = 2
- top = 8.5
- width = 8
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Arrives:"
- endwith
-
-
- this.CHECKMONDAY = new CHECKBOX(this)
- with (this.CHECKMONDAY)
- when = {; return false}
- enabled = false
- transparent = true
- height = 1
- left = 15
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Monday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- endwith
-
-
- this.CHECKTUESDAY = new CHECKBOX(this)
- with (this.CHECKTUESDAY)
- enabled = false
- transparent = true
- height = 1
- left = 20
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Tuesday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- borderStyle = 3
- endwith
-
-
- this.CHECKWEDNESDAY = new CHECKBOX(this)
- with (this.CHECKWEDNESDAY)
- enabled = false
- transparent = true
- height = 1
- left = 25
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Wednesday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- borderStyle = 3
- endwith
-
-
- this.CHECKTHURSDAY = new CHECKBOX(this)
- with (this.CHECKTHURSDAY)
- enabled = false
- transparent = true
- height = 1
- left = 30
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Thursday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- endwith
-
-
- this.CHECKBOXFRIDAY1 = new CHECKBOX(this)
- with (this.CHECKBOXFRIDAY1)
- when = {; return false}
- enabled = false
- transparent = true
- height = 1
- left = 35
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Friday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- endwith
-
-
- this.CHECKBOXSATURDAY1 = new CHECKBOX(this)
- with (this.CHECKBOXSATURDAY1)
- when = {; return false}
- enabled = false
- transparent = true
- height = 1
- left = 40
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Saturday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- endwith
-
-
- this.CHECKSUNDAY = new CHECKBOX(this)
- with (this.CHECKSUNDAY)
- enabled = false
- transparent = true
- height = 1
- left = 10
- top = 10.8947
- width = 2.5
- text = " "
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Sunday"]
- tabStop = false
- colorNormal = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- endwith
-
-
- this.TEXTBOXAIRCRAFT = new TEXT(this)
- with (this.TEXTBOXAIRCRAFT)
- height = 3.5
- left = 1
- top = 13
- width = 48
- border = true
- metric = 0
- colorNormal = "BLUE/BLUE"
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontItalic = true
- text = "Aircraft Information"
- borderStyle = 2
- endwith
-
-
- this.ENTRYFROM = new ENTRYFIELD(this)
- with (this.ENTRYFROM)
- enabled = false
- height = 1
- left = 10
- top = 7.5
- width = 27
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["From ID"]
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.ENTRYTO = new ENTRYFIELD(this)
- with (this.ENTRYTO)
- enabled = false
- height = 1
- left = 10
- top = 8.5
- width = 27
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["To ID"]
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.ENTRYMAKE = new ENTRYFIELD(this)
- with (this.ENTRYMAKE)
- enabled = false
- height = 1
- left = 9
- top = 14
- width = 17
- metric = 0
- dataLink = form.MOD.ref.aircraft1.rowset.fields["Make"]
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.ENTRYMODEL = new ENTRYFIELD(this)
- with (this.ENTRYMODEL)
- enabled = false
- height = 1
- left = 9
- top = 15
- width = 17
- metric = 0
- dataLink = form.MOD.ref.aircraft1.rowset.fields["Model"]
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.LABELMAKE = new TEXT(this)
- with (this.LABELMAKE)
- height = 1
- left = 2
- top = 14
- width = 7
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Make:"
- endwith
-
-
- this.LABELMODEL = new TEXT(this)
- with (this.LABELMODEL)
- height = 1
- left = 2
- top = 15
- width = 7
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Model:"
- endwith
-
-
- this.LABLESUN = new TEXT(this)
- with (this.LABLESUN)
- height = 1
- left = 9
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = "Sun"
- endwith
-
-
- this.LABELMON = new TEXT(this)
- with (this.LABELMON)
- height = 1
- left = 14
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = "Mon"
- endwith
-
-
- this.LABELTUE = new TEXT(this)
- with (this.LABELTUE)
- height = 1
- left = 19
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = "Tue"
- endwith
-
-
- this.LABELWED = new TEXT(this)
- with (this.LABELWED)
- height = 1
- left = 24
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = " Wed"
- endwith
-
-
- this.LABELTHU = new TEXT(this)
- with (this.LABELTHU)
- height = 1
- left = 29
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = "Thu"
- endwith
-
-
- this.LABELFRI = new TEXT(this)
- with (this.LABELFRI)
- height = 1
- left = 34
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = "Fri"
- endwith
-
-
- this.LABELSAT = new TEXT(this)
- with (this.LABELSAT)
- height = 1
- left = 39
- top = 9.9474
- width = 4.6667
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- alignHorizontal = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- fontUnderline = true
- text = "Sat"
- endwith
-
-
- this.ENTRYDAY = new ENTRYFIELD(this)
- with (this.ENTRYDAY)
- enabled = false
- height = 1
- left = 11
- top = 3
- width = 14
- metric = 0
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- value = "Entryfield8"
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.LABELDAY = new TEXT(this)
- with (this.LABELDAY)
- height = 1
- left = 2
- top = 3
- width = 8.5
- metric = 0
- colorNormal = "darkblue"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Day:"
- endwith
-
-
- this.ENTRYDEPARTS = new ENTRYFIELD(this)
- with (this.ENTRYDEPARTS)
- enabled = false
- height = 1
- left = 37.5
- top = 7.5
- width = 10
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Departs"]
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.ENTRYARRIVES = new ENTRYFIELD(this)
- with (this.ENTRYARRIVES)
- enabled = false
- height = 1
- left = 37.5
- top = 8.5
- width = 10
- metric = 0
- dataLink = form.MOD.ref.flight1.rowset.fields["Arrives"]
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.ENTRYCREW = new ENTRYFIELD(this)
- with (this.ENTRYCREW)
- enabled = false
- height = 1
- left = 40
- top = 14
- width = 6
- metric = 0
- dataLink = form.MOD.ref.aircraft1.rowset.fields["Crew"]
- picture = "99999"
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.ENTRYMAXPASSENGERS = new ENTRYFIELD(this)
- with (this.ENTRYMAXPASSENGERS)
- enabled = false
- height = 1
- left = 40
- top = 15
- width = 6
- metric = 0
- dataLink = form.MOD.ref.aircraft1.rowset.fields["Passengers"]
- picture = "99999"
- colorHighLight = ""
- fontName = "MS Sans Serif"
- fontSize = 8
- validRequired = true
- borderStyle = 2
- endwith
-
-
- this.LABELCREW = new TEXT(this)
- with (this.LABELCREW)
- height = 1
- left = 28
- top = 14
- width = 11
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Crew:"
- endwith
-
-
- this.LABELPASSENGER = new TEXT(this)
- with (this.LABELPASSENGER)
- height = 1
- left = 28
- top = 15
- width = 11
- metric = 0
- colorNormal = "DARKBLUE"
- alignVertical = 1
- transparent = true
- fontName = "MS Sans Serif"
- fontSize = 8
- text = "Passengers:"
- endwith
-
-
- this.BUTTONOK = new PUSHBUTTON(this)
- with (this.BUTTONOK)
- onClick = class::BUTTONOK_ONCLICK
- height = 1.2
- left = 51
- top = 1
- width = 12
- text = "OK"
- metric = 0
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- colorNormal = "BtnText/BtnFace"
- value = false
- endwith
-
-
- this.BUTTONCANCEL = new PUSHBUTTON(this)
- with (this.BUTTONCANCEL)
- onClick = class::BUTTONCANCEL_ONCLICK
- height = 1.1818
- left = 51
- top = 3
- width = 12
- text = "Cancel"
- metric = 0
- fontName = "MS Sans Serif"
- fontSize = 8
- group = true
- colorNormal = "BtnText/BtnFace"
- value = false
- endwith
-
-
- this.rowset = this.MOD.ref.schedule1.rowset
-
- // {Linked Method} form.buttoncancel.onClick
- function BUTTONCANCEL_onClick
- this.form.rowset.abandon()
- return ( this.form.close() )
-
- // {Linked Method} form.buttonok.onClick
- function BUTTONOK_onClick
- this.form.rowset.save()
- return ( this.form.close() )
-
- // {Linked Method} form.open
- function Form_open
- class::formPrepare()
- return ( SCHEDULEFORM::OPEN() )
-
- // {Linked Method} form.readModal
- function Form_readModal
- class::formPrepare()
- return ( SCHEDULEFORM::READMODAL() )
-
- function formPrepare
- local f
- f = new Field()
- with ( f )
- fieldName := "WEEKDAY"
- beforeGetValue := { || CDOW(this.parent["Flight Date"].value ) }
- endwith
- this.rowset.fields.add(f)
- this.entryDay.dataLink := this.rowset.fields["WEEKDAY"]
- return true
-
- // {Linked Method} form.spinflightdate.onChange
- function SPINFLIGHTDATE_onChange
- this.form.entryDay.value := CDOW(this.value)
- return ( this.form.entryDay.value )
- endclass
-